<div ng-controller="storeMngCtrl">
    <h1 class="page-header">门店管理</h1>

    <div class="row">
        <div class="col-xs-6 col-sm-3">
            <button type="button" class="btn btn-primary" ui-sref="index.storeForm">新增</button>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-6 col-sm-3">
            <div class="form-group">
                <label>门店名称</label>
                <input class="form-control" ng-model="search.name"/>
            </div>
        </div>


        <div class="col-xs-6 col-sm-3">
            <div class="form-group">
                <label>所属省份</label>
                <place province url="/uj-admin/area/"></place>
            </div>
        </div>

        <div class="col-xs-6 col-sm-3">
            <div class="form-group">
                <label>所属城市</label>
                <place city></place>
            </div>
        </div>

        <div class="col-xs-6 col-sm-3">
            <div class="form-group">
                <label>所属县级市或区</label>
                <place county></place>
            </div>
        </div>

        <div class="col-xs-6 col-sm-3">
            <div class="form-group">
                <label>联系方式</label>
                <input class="form-control" ng-model="search.phone"/>
            </div>
        </div>

    </div>

    <div class="row">
        <table class="table table-bordered top5">
            <thead>
            <tr>
                <th>门店名称</th>
                <th>所属省份</th>
                <th>所属城市</th>
                <th>所属县级市或区</th>
                <th>联系方式</th>
                <th>操作</th>
            </tr>
            </thead>

            <tbody>
            <tr ng-repeat="item in list | filter:search">
                <td ng-bind="item.name"></td>
                <td ng-bind="item.province"></td>
                <td ng-bind="item.city"></td>
                <td ng-bind="item.county"></td>
                <td ng-bind="item.phone"></td>
                <td>
                    <a ng-click="delete(item.id)" class="btn btn-sm">删除门店</a>
                    <a ui-sref="index.storeForm({id:item.id})" class="btn btn-sm">门店详情</a>
                    <a ui-sref="index.storeUpload({id:item.id})" class="btn btn-sm">上传图片</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>

